﻿using Practice.DTO;
using Practice.PH4_2104A.Shopping.SevenLayerFramework.Domin;

namespace Practice.API.config
{
    public class AutomapperConfig:AutoMapper.Profile
    {
        /// <summary>
        /// 在构造函数中，声明你要将谁映射成谁（数据类型）
        /// </summary>
        public AutomapperConfig()
        {
            CreateMap<ProductInputDTO, SPUModel>();
            CreateMap<ProductSKUInputDTO, SKUModel>();
            CreateMap<ProductSpecInputDTO,SPUSpecModel>();

            CreateMap<OrderDetailInputDTO,OrderDetailModel>();
            CreateMap<OrderMasterInputDTO,OrderMasterModel>();
        }
    }
}
